package cn.yunhe.util;

import cn.yunhe.YangLeGeYangApp;
import cn.yunhe.model.*;

import java.awt.*;
import java.util.Random;

public class TransverseMapUtil {
    public static TransverseMap buildTransverseMap(int floorHeight) {
        TransverseMap transverseMap = new TransverseMap();
        transverseMap.setFloorHeight(floorHeight);
        Layer layer1 = LayerUtil.buildLayer(1, floorHeight);
        //parent==null说明当前这⼀层已经是顶层
        //这是循环或者递归结束的重要条件
        layer1.setParent(null);
        transverseMap.getList().add(layer1);
        
        return transverseMap;
    }
}